﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCDto.Utils;

namespace BCDto.Trading.SaleGoods.SaleGoodsCategory
{
    /// <summary>
    /// 销售商品分类
    /// </summary>
    public class SaleGoodsCategoryRequestDto
    {
        /// <summary>
        /// 分类名称
        /// </summary>		
        [Display(Name = "分类名称")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(10, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string CategoryName { get; set; }
        /// <summary>
        /// 分类图标
        /// </summary>
        [Display(Name = "分类图标")]
        [Image(new string[]{"png"})]
        public string CategoryIcon { get; set; }
        /// <summary>
        /// 父级分类Id
        /// </summary>		
        [Display(Name = "父级分类Id")]
        public long? ParentId { get; set; }
    }
}

